home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 19 / macformat_19.iso / Shareware / Comms / ya-nw-text-filter-101 / Filter File Text Format < prev    next >
Text File  |  1996-03-10  |  5KB  |  99 lines

  1. The format of the text version of the filters format is as follows. For more information on how filters work and what the various entries mean, see the YA-NewsWatcher documentation.
  2.  
  3. Running the Filter to TEXT application on a valid YA-NewsWatcher filter file will generate a text file in the correct format. Such a file can be used as a sample of how a properly formatted text version of a YA-NewsWatcher filter file should look and be organized.
  4.  
  5. Any line beginning with a hashmark (#) is considered a comment and is ignored. All other lines are of the form:
  6.  
  7. SYMBOL=value
  8.  
  9. Note that there is no space on either side of the equals sign. SYMBOL is one of the following:
  10.  
  11. GROUP
  12. KEPT
  13. STRING
  14. HEADER
  15. MATCH
  16. EXPIRE
  17. IGNORECASE
  18. SCORE
  19. LABEL
  20. NUMBER1
  21. NUMBER2
  22. ENABLE1
  23. ENABLE2
  24. IGNORE0
  25.  
  26. The meaning of these symbols are described below, along with the permissible values for "value."
  27.  
  28. For each filter group, the following two symbols must be defined. They should appear in the order shown. If this rule is not obeyed it may not be possible to reconvert the text file back to a valid, complete and accurate filter file. In particular the GROUP token is used to signal that a new filter group is being described, so it must appear before the other symbols used to define settings for a particular group or filter. Also, the STRING token is used to signal that a new individual filter is being described, so it must appear before the other symbols used to define settings for a particular filter.
  29.  
  30. GROUP
  31.     The name of the filter group. This is either the name of a newsgroup (for a local filter), the name of a newsgroup followed by a period (for a regional filter), or just a single period (for the global filter group).
  32.  
  33. KEPT
  34.     The "Articles Not Matched Are Kept/Killed" value. This can be set equal to either kTrue (unmatched articles are kept) or kFalse (unmatched articles are killed.)
  35.  
  36. Following these is the listing of the filters in the specified filter group. Each individual filter is defined using the following symbols. Again, they should appear in the order shown. If this rule is not obeyed it may not be possible to reconvert the text file back to a valid, complete and accurate filter file. In particular, the STRING token must appear first, as it is used to signal that a new filter is being described.
  37.  
  38. STRING
  39.     The string used for filter matching. It can be no longer than 255 characters. Everything following the STRING= to the end of the line is considered part of the string. This string is used for most but not all kinds of filters. The exceptions are filtering by date and line count, which ignore the STRING value (and use NUMBER1 ... IGNORE0 instead).
  40.  
  41. HEADER
  42.     The article header used for the filter. The possible values are:
  43.     
  44. Subject
  45. From
  46. Keywords
  47. Summary
  48. Date
  49. Organization
  50. References
  51. Distribution
  52. Lines
  53. Newsgroups
  54. Path
  55. NNTP-PostingHost
  56. Xref
  57.  
  58. MATCH
  59.     What kind of string matching is done between the HEADER and STRING values. Again, this value is used for most but not all kinds of filters. The exceptions are filtering by date and line count, which ignore the MATCH value. The possible values are:
  60.  
  61. kWordBeginsWith
  62. kContainsTheString
  63. kWordEndsWith
  64. kPhraseBeginsWith
  65. kContainsTheWord
  66. kPhraseEndsWith
  67. kPhraseExactlyEquals
  68. kRegExp
  69.  
  70. EXPIRE
  71.     The number of days until the filter expires, with 0 meaning never expire (a perpetual filter). The value must be 0 or a positive whole number.
  72.  
  73. IGNORECASE
  74.     The "Ignore Case" value used when matching strings. It is not used when filtering by date or line count. It also is not used when performing regular expression string matching (MATCH=kRegExp).
  75.  
  76. SCORE
  77.     The score, or importance weighting factor assigned to the filter. The value must be whole number between -32767 and 32767.
  78.  
  79. LABEL
  80.     The number of the label assigned to the filter. There are 34 possible values, from 0 to 33. The values may NOT be the same as the filter priority, because the labels can be reordered by dragging in YA-NW's prefs dialog. At the top of the converted filter file is a list of all the filter labels (obtained from the YA-NW prefs file that was opened as part of the conversion process). For each label the priority value and descriptive text are shown. The two lowest priority filters can not be reordered by dragging or renamed, so number 32 is always priority 32 (unlabeled) and number 33 is always priority 33 (killed).
  81.  
  82. The following are only significant when filtering by date or line count, and the meanings of the these items depends on whether the filter is for a date or a line count.
  83.  
  84. NUMBER1
  85.     The value must be 0 or a positive whole number.
  86.      
  87. NUMBER2
  88.     The value must be 0 or a positive whole number.
  89.     
  90. ENABLE1
  91.     Should the value in NUMBER1 be used in the filter? This can be set equal to either kTrue (the number is used) or kFalse (the number is ignored.)
  92.     
  93. ENABLE2
  94.     Should the value in NUMBER2 be used in the filter? This can be set equal to either kTrue (the number is used) or kFalse (the number is ignored.)
  95.     
  96. IGNORE0
  97.     Should zero values (of date or line count, depending on the filter type) be ignored when applying the filter? This can be set equal to either kTrue (zero values are ignored and not labeled by the filter) or kFalse (zero values are given no special treatment.)
  98.  
  99.